<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;

// 主题栏目
Route::rule('api/:version/getBanner/:id', 'api/:version.Banner/getBanner', 'get');
// 商品栏目
Route::rule('api/:version/getDishList/:dish_cate', 'api/:version.Dish/getDishList', 'get');
// 首页推荐列表
Route::rule('api/:version/getRecommendList/:recommend_count', 'api/:version.IndexList/getRecommendList', 'get');
// 首页新鲜食材列表
Route::rule('api/:version/getFreshList/:fresh_count', 'api/:version.IndexList/getFreshList', 'get');
// 首页小吃专栏列表
Route::rule('api/:version/getSnackList/:snack_count', 'api/:version.IndexList/getSnackList', 'get');
// 首页粉面特惠列表
Route::rule('api/:version/getFlourList/:flour_count', 'api/:version.IndexList/getFlourList', 'get');
// 首页限时列表
Route::rule('api/:version/getTimeLimitList', 'api/:version.IndexList/getTimeLimitList', 'get');
// 首页限量抢购列表
Route::rule('api/:version/getTimeLimitPayList/:limit_count', 'api/:version.IndexList/getTimeLimitPayList', 'get');
// 首页特价商品列表
Route::rule('api/:version/getDiscountPriceList/:discount_count', 'api/:version.IndexList/getDiscountPriceList', 'get');


// 访问token
Route::post('api/:version/token/user', 'api/:version.Token/getToken');

// 新增地址
Route::post('api/:version/address', 'api/:version.Address/createUpdateAddress');

// 下单
Route::rule('api/:version/order', 'api/:version.Orders/placeOrder', 'post');
// 支付
Route::rule('api/:version/pay/pre_orders', 'api/:version.Pay/getPreOrders', 'post');
// 微信回调
Route::rule('api/:version/pay/notify', 'api/:version.Pay/receiveNotify', 'post');
// 历史订单查询
Route::rule('api/:version/orders/by_user', 'api/:version.Orders/getSummaryByUser', 'post');
// 历史订单详情查询
Route::post('api/:version/orders/:id', 'api/:version.Orders/getOrdersDetail');
